from launch import LaunchDescription
from launch_ros.actions import Node
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from ament_index_python.packages import get_package_share_directory
import os


def generate_launch_description():
    config = os.path.join(
        get_package_share_directory('gripper_control'), 
                'config',
                'gripper_communicator.params.yaml'
    )
    
    return LaunchDescription([
        Node(
            package='gripper_control',
            executable='gripper_communicator',
            name='gripper_communicator',
            parameters=[config],
            output='screen'
        )
    ])